class Light {
    status: string
    color: string
}

function main() {
    const light = new Light()
    if (light.status === "on") {
        throw new Error("The light is on")
    }
    light.status = "on"
    light.color = "red"
}
